package com.zx.designpattern.model.http.api;


import com.zx.designpattern.model.http.BaseEntity;
import com.zx.designpattern.model.bean.User;

import java.util.Map;

import io.reactivex.Flowable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;

/**
 * Created by zhoux on 2017/3/15.
 * 注释：接口
 */

public interface UserService {
    @GET("user/login")
    Flowable<BaseEntity<Map<String, User>>> login(@QueryMap(encoded = true) Map<String, String> account);

    @FormUrlEncoded
    @POST("user/register")
    Flowable<BaseEntity<Map<String, String>>> register(@FieldMap Map<String, String> account);
}
